package com.zhanbo.zhanbowymusic.main.featured.adapter;

import android.content.Context;

import com.mwx.baselib.base.BaseBindingAdapter;
import com.mwx.baselib.bean.ArtistAlbumBean;
import com.mwx.baselib.utils.DateUtils;
import com.mwx.baselib.utils.GlideUtils;
import com.zhanbo.zhanbowymusic.R;
import com.zhanbo.zhanbowymusic.databinding.ItemSingerAlbumBinding;

public class SingerAlbumListAdapter extends BaseBindingAdapter<ArtistAlbumBean.ItemsDTO, ItemSingerAlbumBinding> {
    public SingerAlbumListAdapter(Context context) {
        super(context);
    }

    @Override
    protected int getLayoutResId(int viewType) {
        return R.layout.item_singer_album;
    }

    @Override
    protected void onBindItem(ItemSingerAlbumBinding binding, ArtistAlbumBean.ItemsDTO item) {
        GlideUtils.loadImageRounded10(context,item.getAlbum().getCoverUrl(),binding.ivSingerAlbumHead);
        binding.tvSingerAlbumDate.setText(DateUtils.ISO8601Format(item.getAlbum().getUpdateTime()+""));
        binding.tvSingerAlbumName.setText(item.getAlbum().getName()+"");
    }
}
